import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/EpHome.vue'
import EpLoginForm from '@/views/EpLoginForm.vue'
import EpRegisterForm from '@/views/EpRegisterForm.vue'
import EpAddCourse from '@/views/EpAddCourse.vue'
import EpUserProfile from '@/views/EpUserProfile.vue'
import EpExams from '@/views/EpExams.vue'
import EpStudentManagement from '@/views/EpStudentManagement.vue'
import EpCourseArrangement from '@/views/EpCourseArrangement.vue'
import EpAdminDashboard from '@/views/EpAdminDashboard.vue'
import EpCoachManagement from '@/views/EpCoachManagement.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/', name: 'home', component: HomeView },
    { path: '/login', name: 'login', component: EpLoginForm },
    { path: '/register', name: 'register', component: EpRegisterForm },
    { path: '/addCourse', name: 'addCourse', component: EpAddCourse },
    { path: '/userProfile/:accountNumber', name: 'userProfile', component: EpUserProfile },
    { path: '/exams', name: 'exams', component: EpExams },
    
    // 新增教练相关路由
    { path: '/student-management', name: 'studentManagement', component: EpStudentManagement },
    { path: '/course-arrangement/:studentId', name: 'courseArrangement', component: EpCourseArrangement },
    
    // 管理员路由
    { 
      path: '/admin-dashboard',
      name: 'admin-dashboard',
      component: EpAdminDashboard
    },
    {
      path: '/coach-management',
      name: 'coach-management',
      component: EpCoachManagement
    },
  ],
})

export default router
